package com.snail.exception;



import com.snail.result.IResultCode;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * 自定义业务异常
 * @author Monica
 * @date 2025/6/7 11:40
 */

@Getter
public class BizException extends RuntimeException {

    public IResultCode resultCode;



    public BizException(IResultCode errorCode) {
        super(errorCode.getMsg());
        this.resultCode = errorCode;
    }

    public BizException(String message){
        super(message);
    }

    public BizException(IResultCode errorCode, String message){
        super(message);
        this.resultCode = errorCode;
    }

    public BizException(String message, Throwable cause){
        super(message, cause);
    }

    public BizException(Throwable cause){
        super(cause);
    }

}
